﻿using System;
using System.Threading;
using System.IO.Ports;
using System.Text;

using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using BigBlueSparx.NetMF.FEZ.HMC6352Compass;
using BigBlueSparx.NetMF.FEZ;

using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Net;

namespace FEZ_Cobra_Console_Application1
{
    public class Program
    {
        static bool ledState = false;
        static OutputPort led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, ledState);
        //static OutputPort speaker = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.IO10,false);
        
        public static void Main()
        {

            Readouts r = Readouts.getInstance();
            r.startSampling();

            Wifi theConnection = new Wifi();
            theConnection.CommunicationsSubsystemFacade();


                while (true)
                {
                    Thread.Sleep(1000);
                    // toggle LED state
                    ledState = !ledState;
                    led.Write(ledState);
                }
            
        }

    }

}
